import { BattleController } from '../core/BattleController';
import { TeamManager } from '../core/TeamManager';
import { SkillEquipManager } from '../core/SkillEquipManager';
import { FormationType } from '../types';
import { createTeams } from './setup/teams';
import { displayBattleReport } from './display/battleReport';

async function runExampleBattle() {
  // 1. 创建团队管理器和技能装备管理器
  const teamManager = new TeamManager();
  const skillManager = new SkillEquipManager();

  // 2. 创建两支队伍
  const teams = createTeams(teamManager, skillManager);
  if (!teams || !teams.teamA || !teams.teamB) {
    console.error('Failed to create teams');
    return;
  }

  // 3. 创建战斗控制器并开始战斗
  const battleController = new BattleController(teams.teamA, teams.teamB);
  const battleReport = await battleController.startBattle();

  // 4. 显示战斗报告
  displayBattleReport(battleReport);
}

// 运行示例战斗
runExampleBattle().catch(console.error);
